package org.luxor.commons.workflow.entity;

import javax.validation.constraints.NotBlank;

/**
 * 多实例任务加签
 *
 * @author Mr.yan  @date 2021/10/19
 */
public class AddMultiInstanceExecution {

    /**
     * 任务ID
     */
    @NotBlank(message = "任务ID(taskId)，不能为空")
    private String taskId;

    /**
     * 会签办理人
     */
    @NotBlank(message = "会签办理人(assignee)，不能为空")
    private String assignee;

    /**
     * 前置签？（true-前置会签；false-后置会签）
     * </P>
     * 如果是并行会签节点，则会忽略该参数
     */
    private boolean beforeInstance;

    /**
     * 操作原因
     */
    private String reason;

    public AddMultiInstanceExecution() {
        this.beforeInstance = false;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public boolean getBeforeInstance() {
        return beforeInstance;
    }

    public void setBeforeInstance(boolean beforeInstance) {
        this.beforeInstance = beforeInstance;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public String toString() {
        return "AddMultiInstanceExecution{" +
                "taskId='" + taskId + '\'' +
                ", reason='" + reason + '\'' +
                ", assignee='" + assignee + '\'' +
                ", beforeInstance=" + beforeInstance +
                '}';
    }
}
